#include "sbb.h"


int main()
{
	double kk[2]={41,12};
	
	/*cout<<kk[0]<<kk[1];
	ReadSample();
	InitBPNetwork();
	TrainNetwork();
	cout<<Result(kk);
	WriteValue();
	ReadValue();*/
	//cout<<Result(kk);
	FILE *fp_out;
	fp_out=fopen("value.txt","w");	
	for(i=0;i<Neuron;i++)
	{
		for(j=0;j<In;j++)
			fprintf(fp_out, "%4.15f%c",1.222222222222222,' ');
		fprintf(fp_out, "\n");
	}
	for(i=0;i<Out;i++)
	{
		for(j=0;j<Neuron;j++)
			fprintf(fp_out, "%4.15f%c",2.545454445132,' ');
		fprintf(fp_out, "\n");
	}
	fclose(fp_out);
	ifstream fin("value.txt", std::ios::in);
	char line[1024]={0};
	while(fin.getline(line, sizeof(line)))
	{
		for(i=0;i<Neuron;i++)
		{
			for(j=0;j<In;j++)
				fin>>w[i][j];
		}
		if(i==Neuron)
		{
			for(i=0;i<Out;i++)
			{
				for(j=0;j<Neuron;j++)
					fin>>v[i][j];
			}
		}
	}
	fin.close();
	return 0;
}

